# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=dua
pkgver=2.29.0
pkgrel=0
pkgdesc="Tool to conveniently learn about the usage of disk space"
url="https://github.com/Byron/dua-cli"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/Byron/dua-cli/archive/v$pkgver/dua-$pkgver.tar.gz"
builddir="$srcdir/dua-cli-$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
257a839f43c4f9155b819e6a1c6e268513ef9c53a49731234d3344c130276c7e724cc32b3545342d36459d892459568c78444f826f805aa6f34cf78aa8c498b8  dua-2.29.0.tar.gz
"
